<template>
	<view :style="themeColor">
		<view class="page">
			<view class="flex benben-position-layout flex flex-wrap align-center canyujinpai_flex_0"
				:style="{height:(88+StatusBarRpx)+'rpx',paddingTop:StatusBarRpx+'rpx', }">
				<view class='flex flex-wrap align-center justify-between flex-sub canyujinpai_fd0_0'>
					<view class='flex flex-wrap align-center canyujinpai_fd0_0_c0' @tap.stop="handleJumpDiy"
						data-type="back" data-url="1">
						<text class='fu-iconfont2  canyujinpai_fd0_0_c0_c0'>&#xE794;</text>
					</view>
					<view class='flex flex-wrap align-stretch justify-center'>
						<text class='canyujinpai_fd0_0_c1_c0'>内容修改</text>
					</view>
					<view class='flex flex-wrap align-center justify-end canyujinpai_fd0_0_c0'>
					</view>
				</view>
			</view>
			<view :style="{height: (88+StatusBarRpx)+'rpx'}"></view>
			<!---flex布局flex布局开始-->
			<view class="flex flex-wrap align-center benben-flex-layout">
				<view class='flex flex-direction align-center self-center justify-center canyujinpai_fd1_6'>
					<benben-images-upload ref="benbenImagesUploadfd1_0_c4_c0" :img-list.sync="img"
						:img-ids.sync="img_id" :is-show-tips='true' :maxlength="1">
						<template #content="{ num, maxlength, isShow, imgList }">
							<view class="flex flex-wrap align-start flex feedBack_fd1_0_c4_c0">
								<image class="feedBack_fd1_0_c4_c00" :src="headimg" mode="aspectFill" v-if="imgList.length==0"></image>
								<view v-for="(image, index) in imgList" v-if="imgList.length>0" :key="index" class='flex position-relative feedBack_fd1_0_c4_c00'>
									<image class='feedBack_fd1_0_c4_c001'
										@tap.stop="$refs.benbenImagesUploadfd1_0_c4_c0.previewImage(index)"
										mode="aspectFill" :src='image'>
									</image>
								</view>
							</view>
							<view class='flex flex-wrap align-center justify-center canyujinpai_fd1_6_c1'@tap.stop="$refs.benbenImagesUploadfd1_0_c4_c0.manyChooseImage()">
								<text class='self-center canyujinpai_fd1_6_c1_c0'>更改图片</text>
							</view>
						</template>
					</benben-images-upload>
					<view class='flex flex-wrap align-center justify-between canyujinpai_fd1_6_c2'>
						<view class='flex flex-wrap align-center canyujinpai_fd1_2_c0'>
							<text class='canyujinpai_fd1_2_c0_c0'>姓名</text>
						</view>
						<view class='flex flex-wrap align-center canyujinpai_fd1_6_c2_c1'>
							<benben-input class='canyujinpai_fd1_6_c2_c1_c0' type="text" :placeholder="`请输入姓名`"
								confirm-type="done" :maxlength="10" :adjust-position='true'
								placeholder-style="color:rgba(153, 153, 153, 1);font-size:28rpx" v-model="peoplename" />
						</view>
					</view>
					<view class='flex flex-wrap align-center justify-between canyujinpai_fd1_6_c2'>
						<view class='flex flex-wrap align-center canyujinpai_fd1_2_c0'>
							<text class='canyujinpai_fd1_2_c0_c0'>职务</text>
						</view>
						<view class='flex flex-wrap align-center canyujinpai_fd1_6_c2_c1'>
							<benben-input class='canyujinpai_fd1_6_c2_c1_c0' type="text" :placeholder="`输入职务`"
								confirm-type="done" :maxlength="10" :adjust-position='true'
								placeholder-style="color:rgba(153, 153, 153, 1);font-size:28rpx" v-model="zhiwu" />
						</view>
					</view>
					<view class='flex flex-wrap align-center justify-between canyujinpai_fd1_6_c2'>
						<view class='flex flex-wrap align-center canyujinpai_fd1_2_c0'>
							<text class='canyujinpai_fd1_2_c0_c0'>电话</text>
						</view>
						<view class='flex flex-wrap align-center canyujinpai_fd1_6_c2_c1'>
							<benben-input class='canyujinpai_fd1_6_c2_c1_c0' type="number" :placeholder="`输入电话`"
								confirm-type="done" :maxlength="11" :adjust-position='true'
								placeholder-style="color:rgba(153, 153, 153, 1);font-size:28rpx"
								v-model="peoplephone" />
						</view>
					</view>
					<view class='flex flex-wrap align-center justify-between canyujinpai_fd1_6_c2'>
						<view class='flex flex-wrap align-center canyujinpai_fd1_2_c0'>
							<text class='canyujinpai_fd1_2_c0_c0'>单位</text>
						</view>
						<view class='flex flex-wrap align-center canyujinpai_fd1_6_c2_c1'>
							<benben-input class='canyujinpai_fd1_6_c2_c1_c0' type="text" :placeholder="`输入所在单位`"
								confirm-type="done" :maxlength="10" :adjust-position='true'
								placeholder-style="color:rgba(153, 153, 153, 1);font-size:28rpx" v-model="company" />
						</view>
					</view>
					<view class='flex flex-wrap align-center justify-between canyujinpai_fd1_6_c2'>
						<view class='flex flex-wrap align-center canyujinpai_fd1_2_c0'>
							<text class='canyujinpai_fd1_2_c0_c0'>简介</text>
						</view>
					</view>
					<view class='flex flex-wrap align-center canyujinpai_fd1_6_c7'>
						<view class='flex flex-wrap canyujinpai_fd1_6_c7_c0'>
							<textarea class='flex canyujinpai_input_fd1_6_c7_c0' :placeholder="'输入个人简介，不超过200字'"
								:adjust-position='true' :maxlength="200" :show-num='true'
								placeholder-style="color:rgba(187, 187, 187, 1);font-size:28rpx"
								v-model="fd1_6_c7_c0" />
							<template>
								<view class='flex flex justify-end canyujinpai_numberfd1_6_c7_c0_c0'>
									<text>{{fd1_6_c7_c0.length}}</text>
									<text>/</text>
									<text>200</text>
								</view>
							</template>
						</view>
					</view>
				</view>
			</view>
		</view>
		<view class='flex flex-wrap align-center canyujinpai_fd1_7'>
		</view>
		<view class='flex flex-wrap align-center justify-center canyujinpai_fd1_9' @click="submitclick">
			<text class='canyujinpai_fd1_9_c0'>保存</text>
		</view>
	</view>
</template>
<script>
	import {
		validate
	} from '@/common/utils/validate.js'
	export default {
		components: {},
		data() {
			return {
				"pickerDiy1709015937755": false,
				"popupShow1709187520424": false,
				"popupShow1709188707828": false,
				"fd1_1_c1_c0": 0,//倒计时
				auction: "", //区域信息
				povicename: "", //省
				cityname: "", //市
				address: "", //地址
				peoplename: "", //姓名
				zhiwu: "", //职务
				peoplephone: "", //电话
				company: "", //单位
				"fd1_6_c7_c0": "", //简介
				fadou: "", //法豆
				headimg: "", //头像
				"img": [],
				"img_id": "",
				imgList:[],
				auctionList:[],//竞拍列表
			};
		},
		computed: {
			themeColor() {
				return this.$store.getters.themeColor
			},
		},
		watch: {},
		onLoad(options) {
			this.aid = options.aid;
			this.get_auction_detail();
		},
		onUnload() {

		},
		onReady() {

		},
		onShow() {
			
		},
		onHide() {

		},
		onResize() {

		},
		onPullDownRefresh() {

		},
		onReachBottom(e) {

		},
		onPageScroll(e) {

		},
		methods: {
			//竞拍详情
			get_auction_detail(){
				this.$api.post(global.apiUrls.get_auction_detail, {
					aid:this.aid,
				}).then(res => {
					if (res.data.code == 1) {
						let detail = res.data.data;
						this.headimg = detail.head;
						// this.imgList.push(detail.head);
						// this.img = detail.head;
						this.peoplename = detail.realname;
						this.zhiwu = detail.zhiwu;
						this.peoplephone = detail.mobile;
						this.company = detail.danwei;
						this.fd1_6_c7_c0 = detail.jianjie;
					}else{
						this.$message.info(res.data.msg);
					}
				})
			},
			
			//修改图片
			imgchenge(e){
				console.log(e)
			},

			//提交事件
			submitclick() {
				let headimglog = "";
				if(this.img.length==0){
					headimglog = this.headimg
				}else{
					headimglog = this.img.toString()
				}
				if (headimglog=='') {
					this.$message.info("请上传头像");
					return
				}
				if (this.peoplename == "") {
					this.$message.info("请填写姓名");
					return
				}
				if (this.zhiwu == "") {
					this.$message.info("请填写职务");
					return
				}
				if (!validate(this.peoplephone, 'phone')) {
					this.$message.info('请输入正确的手机号');
					return false;
				}
				if (this.company == "") {
					this.$message.info("请填写所在单位");
					return
				}
				if (this.fd1_6_c7_c0 == "") {
					this.$message.info("请填写简介");
					return
				}
				this.$api.post(global.apiUrls.edit_auction, {
					head:headimglog,
					realname: this.peoplename,
					zhiwu: this.zhiwu,
					mobile: this.peoplephone,
					danwei: this.company,
					jianjie: this.fd1_6_c7_c0,
					aid:this.aid,
				}).then(res => {
					if (res.data.code == 1) {
						this.$message.info("修改成功")
						uni.navigateBack()
					}else{
						this.$message.info(res.data.msg);
					}
				})
			},
		}
	};
</script>
<style lang="scss" scoped>
	.feedBack_fd1_0_c4_c0{
		width: 100%;
		overflow: hidden;
	}
	.feedBack_fd1_0_c4_c00{
		width: 262rpx;
		height: 366rpx;
		margin-top: 24rpx;
	}
	.feedBack_fd1_0_c4_c001{
		width: 262rpx;
		height: 366rpx;
	}
	.page {
		width: 100vw;
		overflow-x: hidden;
		min-height: calc(100vh - var(--window-bottom));
		background: rgba(239, 239, 239, 1);
		background-size: 100% auto;
	}

	.canyujinpai_flex_0 {
		background: #fff;
		width: 750rpx;
		height: 88rpx;
		overflow: hidden;
		z-index: 10;
		top: 0rpx;
		background-size: 100% auto !important;
	}

	.canyujinpai_fd0_0_c1_c0 {
		font-size: 36rpx;
		font-weight: 700;
		color: #333333;
		line-height: 50rpx;
	}

	.canyujinpai_fd0_0_c0_c0 {
		font-size: 36rpx;
		color: #333;
	}

	.canyujinpai_fd0_0_c0 {
		width: 120rpx;
	}

	.canyujinpai_fd0_0 {
		padding: 0rpx 32rpx 0rpx 32rpx;
	}

	.canyujinpai_fd1_9_c0 {
		color: #FFFFFF;
		font-size: 32rpx;
		font-weight: 400;
	}

	.canyujinpai_fd1_9 {
		background: #26BF01;
		border-radius: 4rpx 4rpx 4rpx 4rpx;
		width:100%;
		height: 98rpx;
		position: fixed;
		left: 0;
		bottom: 0;
	}

	.canyujinpai_fd1_8_c0_c1_c0 {
		width: 66rpx;
		height: 66rpx;
		border-radius: 33rpx;
	}

	.canyujinpai_fd1_8_c0_c0_c1 {
		font-size: 28rpx;
		color: #FD0100;
		font-weight: 400;
		padding: 0rpx 0rpx 0rpx 24rpx;
	}

	.canyujinpai_fd1_7 {
		width: 100%;
		height: 120rpx;
	}

	.canyujinpai_numberfd1_6_c7_c0_c0 {
		width: 100%;
		font-size: 24rpx;
		color: #FFFFFF;
		line-height: 46rpx;
		font-weight: 400;
	}

	.canyujinpai_input_fd1_6_c7_c0 {
		width: 650%;
		font-size: 28rpx;
		font-weight: 400;
		color: #333;
		white-space: pre-wrap;
		padding: 24rpx;
	}

	.canyujinpai_fd1_6_c7_c0 {
		border: 1px solid #00A7FF;
		background: #F8F9FD;
		width: 650rpx;
		border-radius: 10rpx 10rpx 10rpx 10rpx;
		margin: 0rpx 0rpx 32rpx 0rpx;
	}

	.canyujinpai_fd1_6_c7 {
		width: 650rpx;
	}

	.canyujinpai_fd1_6_c2_c1_c0 {
		text-align: right;
	}

	.canyujinpai_fd1_6_c2_c1 {
		margin: 0rpx 50rpx 0rpx 0rpx;
	}

	.canyujinpai_fd1_6_c2 {
		border-top: 1px solid rgba(242, 242, 242, 1);
		width: 100%;
		height: 94rpx;
		line-height: 94rpx;
	}

	.canyujinpai_fd1_6_c1_c0 {
		color: #FFFFFF;
		font-size: 28rpx;
		font-weight: 400;
	}

	.canyujinpai_fd1_6_c1 {
		background: #26BF01;
		width: 134rpx;
		height: 56rpx;
		border-radius: 8rpx;
		margin: 30rpx auto;
	}

	.canyujinpai_fd1_6_c0_c0 {
		width: 100%;
		height: 100%;
		border-radius: 0rpx 0rpx 0rpx 0rpx;
	}

	.canyujinpai_fd1_6_c0 {
		width: 354rpx;
		height: 472rpx;
		margin: 20rpx 0rpx 0rpx 0rpx;
	}

	.canyujinpai_fd1_6 {
		background: rgba(255, 255, 255, 1);
		width: 100%;
		background-size: 100% auto;
	}

	.canyujinpai_fd1_4_c0 {
		color: #9B9B9B;
		font-size: 28rpx;
		font-weight: 400;
		height: 88rpx;
		line-height: 88rpx;
		padding: 0rpx 0rpx 0rpx 24rpx;
	}

	.canyujinpai_fd1_4 {
		width: 100%;
	}

	.canyujinpai_fd1_3 {
		width: 100%;
		height: 88rpx;
	}

	.canyujinpai_fd1_2_c2_c2 {
		border-bottom: 1px solid rgba(242, 242, 242, 1);
		background: rgba(239, 239, 239, 1);
		width: 100%;
		line-height: 94rpx;
		height: 94rpx;
		background-size: 100% auto;
	}

	.canyujinpai_fd1_2_c2_c1_c1 {
		color: rgba(187, 187, 187, 1);
		width: 16rpx;
		height: 12rpx;
		position: relative;
		top: -40rpx;
	}

	.canyujinpai_fd1_2_c1_c0 {
		color: #999999;
		font-size: 28rpx;
		font-weight: 400;
	}

	.canyujinpai_fd1_2_c1 {
		margin: 0rpx 050rpx 0rpx 0rpx;
	}

	.canyujinpai_fd1_2_c0_c0 {
		color: #1A1A1A;
		font-size: 28rpx;
		font-weight: 400;
	}

	.canyujinpai_fd1_2_c0 {
		margin: 0rpx 0rpx 0rpx 50rpx;
	}

	.canyujinpai_fd1_2 {
		border-bottom: 1px solid rgba(242, 242, 242, 1);
		background: rgba(255, 255, 255, 1);
		width: 100%;
		line-height: 94rpx;
		height: 94rpx;
		background-size: 100% auto;
	}

	.canyujinpai_fd1_1_c2 {
		background: rgba(161, 113, 0, 1);
		width: 126rpx;
		height: 44rpx;
		margin: 12rpx 0rpx 24rpx 0rpx;
		border-radius: 22rpx 22rpx 22rpx 22rpx;
		line-height: 44rpx;
	}

	.canyujinpai_fd1_1_c1_c0 {
		background: #FFFFFF;
		color: #fff;
	}

	.canyujinpai_fd1_1 {
		background: rgba(233, 180, 4, 1);
		width: 100%;
		background-size: 100% auto;
	}

	.canyujinpai_fd1_0_c2_c0 {
		color: #FFFFFF;
		font-size: 20rpx;
		font-weight: 400;
	}

	.canyujinpai_fd1_0_c2 {
		background: #1E632C;
		width: 126rpx;
		height: 44rpx;
		margin: 12rpx 0rpx 24rpx 0rpx;
		border-radius: 22rpx 22rpx 22rpx 22rpx;
		line-height: 44rpx;
	}

	.canyujinpai_fd1_0_c1_c0 {
		color: #FFFFFF;
		font-size: 36rpx;
		font-weight: 400;
	}

	.canyujinpai_fd1_0_c0_c0 {
		color: #FFFFFF;
		font-size: 20rpx;
		font-weight: 400;
		padding: 20rpx 0rpx 20rpx 0rpx;
	}

	.canyujinpai_fd1_0 {
		background: #01BF85;
		width: 100%;
		background-size: 100% auto;
	}

	.canyujinpai_flex_2 {
		background: #fff;
		width: 540rpx;
		background-size: 100% auto !important;
		border-radius: 16rpx 16rpx 16rpx 16rpx;
		padding: 32rpx 24rpx 24rpx 24rpx;
	}

	.canyujinpai_fd2_2_c1 {
		background: #26BF01;
		border-radius: 8rpx;
		font-size: 28rpx;
		color: #FFFFFF;
		width: 216rpx;
		height: 74rpx;
		font-weight: 500;
		line-height: 72rpx;
	}

	.canyujinpai_fd2_2_c0 {
		background: rgba(238, 242, 237, 1);
		border-radius: 16rpx 16rpx 16rpx 16rpx;
		font-size: 28rpx;
		color: #333;
		width: 234rpx;
		height: 72rpx;
		font-weight: 500;
		line-height: 72rpx;
	}

	.canyujinpai_fd2_1_c0 {
		text-align: center;
		line-height: 42rpx;
		font-size: 28rpx;
		font-weight: 400;
		color: #333333;
	}

	.canyujinpai_fd2_1 {
		margin: 24rpx 0rpx 40rpx 0rpx;
	}

	.canyujinpai_fd2_0_c0 {
		line-height: 45rpx;
		font-size: 32rpx;
		font-weight: 500;
		color: #333333;
	}

	.canyujinpai_fd3_0_c2_c0 {
		background: #26BF01;
		border-radius: 4rpx 4rpx 4rpx 4rpx;
		width: 456rpx;
		line-height: 80rpx;
		font-size: 32rpx;
		color: #fff;
		height: 74rpx;
	}

	.canyujinpai_fd3_0_c2 {
		padding: 0rpx 0rpx 48rpx 0rpx;
	}

	.canyujinpai_fd3_0_c1_c0 {
		font-size: 26rpx;
		font-weight: 500;
		color: #333333;
		text-align: center;
	}

	.canyujinpai_fd3_0_c1 {
		margin: 48rpx 0rpx 64rpx 0rpx;
	}

	.canyujinpai_fd3_0_c0_c0 {
		width: 112rpx;
		height: 112rpx;
		border-radius: 0rpx 0rpx 0rpx 0rpx;
	}

	.canyujinpai_fd3_0_c0 {
		margin: 48rpx 0rpx 24rpx 0rpx;
	}

	.canyujinpai_fd3_0 {
		background: #fff;
		background-size: 100% auto !important;
		border-radius: 16rpx 16rpx 16rpx 16rpx;
		padding: 0rpx 0rpx 0rpx 0rpx;
		width: 510rpx;
	}

	.canyujinpai_picker4_0_c2 {
		color: rgba(253, 1, 0, 1);
	}

	.canyujinpai_picker4_0 {
		border-bottom: 1px solid #eee;
		background: #fff;
		padding: 0rpx 32rpx 0rpx 32rpx;
		line-height: 88rpx;
		border-radius: 25rpx 25rpx 0rpx 0rpx;
		background-size: 100% auto !important;
	}
</style>